package com.community.itelligentcommunity.sys.controller;

import com.community.itelligentcommunity.common.base.controller.GenericController;
import com.community.itelligentcommunity.common.base.service.GenericService;
import com.community.itelligentcommunity.sys.entity.QueryFile;
import com.community.itelligentcommunity.sys.entity.file;
import com.community.itelligentcommunity.sys.service.FileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

/**
 * 类描述：菜单controller类
 */
@Controller
@RequestMapping("/file")
public class FileController extends GenericController<file, QueryFile> {
    @Override
    protected GenericService<file, QueryFile> getService() {
        return fileService;
    }
    @Autowired
    private FileService fileService;


    @RequestMapping(value = "/updateFile",method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE)
    @ResponseBody
    public Map<String, Object> updateFile(file entity) throws Exception {


        return super.update(entity);
    }
}

